package com.mjh.service.impl;

import com.mjh.bean.UserRole;
import com.mjh.mapper.UserRoleMapper;
import com.mjh.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserRoleServiceImpl implements UserRoleService {

    @Autowired
    private UserRoleMapper userRoleMapper;
    @Override
    public boolean modifyUserRole(UserRole role) {
        return userRoleMapper.updateRole(role)>0;
    }

    @Override
    public boolean addUserRole(UserRole role) {

        return userRoleMapper.insert(role)>0;
    }
}
